#pragma config(Sensor, dgtl1,  ArmEncoderLeft,      sensorQuadEncoder)
#pragma config(Sensor, dgtl3,  ArmEncoderRight,     sensorQuadEncoder)
#pragma config(Sensor, dgtl5,  BaseEncoderLeft,     sensorRotation)
#pragma config(Sensor, dgtl6,  BaseEncoderRight,    sensorRotation)
#pragma config(Sensor, dgtl7,  ProgramSwitch,       sensorTouch)
#pragma config(Motor,  port1,           LeftBase,      tmotorNormal, openLoop)
#pragma config(Motor,  port4,           LeftArm,       tmotorNormal, openLoop)
#pragma config(Motor,  port5,           RightArm,      tmotorNormal, openLoop, reversed)
#pragma config(Motor,  port6,           LeftVacume,    tmotorNormal, openLoop, reversed)
#pragma config(Motor,  port7,           RightVacume,   tmotorNormal, openLoop)
#pragma config(Motor,  port8,           LeftTurntable, tmotorNormal, openLoop, reversed)
#pragma config(Motor,  port9,           RightTurntable, tmotorNormal, openLoop, reversed)
#pragma config(Motor,  port10,          RightBase,     tmotorNormal, openLoop, reversed)
//*!!Code automatically generated by 'ROBOTC' configuration wizard               !!*//


void ArmsTo30()
{
  SensorValue(ArmEncoderLeft) = 0;
  SensorValue(ArmEncoderRight) = 0;
  bool ArmUp = true;
  while(ArmUp == true)
  {
    if(SensorValue(ArmEncoderLeft) <= 2250)
    {
      motor[LeftArm] = 127;
    }
    else
    {
      motor[LeftArm] = 10;
    }
    if(SensorValue(ArmEncoderRight) <= 2250)
    {
      motor[RightArm] = 127;
    }
    else
    {
      motor[RightArm] = 10;
    }
    if(SensorValue(ArmEncoderLeft) >= 2250 && SensorValue(ArmEncoderRight) >= 2250)
    {
      ArmUp = false;
    }
  }
}

task main()
{
  ArmsTo30();
}
